//
//  SingleObj.m
//  SwiftTest
//
//  Created by mac on 14/10/29.
//  Copyright (c) 2014年 zhouy. All rights reserved.
//

#import "SingleObj.h"

@implementation SingleObj

static SingleObj * staticInstance;


+(SingleObj *)instance{
    
    @synchronized(self) {
        if (staticInstance==nil) {
            staticInstance =[[self alloc] init];
        }
        
        return staticInstance;
    }
    
}

+(id) allocWithZone:(struct _NSZone *) zone {
    @synchronized(self){
        if (staticInstance==nil) {
            staticInstance = [super allocWithZone:zone];
        }
        return staticInstance;
    }
    
}

-(void) doExcute{
	
    NSLog(@" mydoExcute");
    
}

-(void) doPP1:(NSString *)str1 doPP2:(NSString *)str2{
    NSLog(@" pp1%@  pp2%@",str1,str2);
}

@end
